<div id="content">
    <div id="left">
        <?php

        $this->widget ( 'application.modules.manage.widgets.ViewWidgets', array (
            'view' => 'nav_uiconfig'
        ) );
        ?>
    </div>
    <div id="right">
        <div class="box">
            <div class="title">
                <h5>界面设置>模板设置</h5>
            </div>
            <div class="table">
                <table>
                    <thead>
                    <tr>
                        <th  class="tal">模板</th>
                        <?php
                        if($this->actExist('Del')){
                            ?>
                            <th class="last" style="width:150px;">工具</th>
                        <?php
                        }
                        ?>
                    </tr>
                    </thead>
                    <tbody>
                    <?php
                    if (sizeof ( $templates ) > 0) {
                        foreach($templates as $t){
                            ?>
                            <tr>
                                <td class="tal"><?php echo $t['name'];?></td>
                                <?php
                                if($this->actExist('Del')){
                                    ?>
                                    <td class="last tac"><button class="btn" onclick="showedit(<?php echo $t['flash_id']; ?>)">编辑图片</button></td>
                                <?php
                                }
                                ?>
                            </tr>
                        <?php
                        }
                    }
                    ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
<script>
    function showedit(fid){
        window.location.href="showedit?flash_id="+fid;
    }
</script>